package exceptions;

import java.util.ArrayList;

@SuppressWarnings("serial")
public class CepicamException extends Exception {
	private ExceptionLevel level = ExceptionLevel.FATAL;
	private ArrayList<String> errorMessages;
	
	public CepicamException() {
		super();
		this.errorMessages = new ArrayList<String>();
	}
	
	public CepicamException(String error, ExceptionLevel level) {
		super();
		this.errorMessages = new ArrayList<String>();
		errorMessages.add(error);
		this.level = level;
	}
	
	public CepicamException(ArrayList<String> errorMessages, ExceptionLevel level) {
		super();
		this.errorMessages = new ArrayList<String>();
		this.errorMessages.addAll(errorMessages);
		this.level = level;
	}
	
	public ArrayList<String> getErrorMessages() {
		return this.errorMessages;
	}
	
	public ExceptionLevel getExceptionLevel() {
		return this.level;
	}
}
